package com.orangelife.webservice.service.propinfo;

import java.util.Map;

import javax.jws.WebParam;
import javax.jws.WebService;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;

import org.apache.cxf.interceptor.InInterceptors;
import org.apache.cxf.interceptor.OutInterceptors;

import com.orangelife.exception.AppBizException;

@WebService
@InInterceptors(interceptors = "org.apache.cxf.interceptor.LoggingInInterceptor")
@OutInterceptors(interceptors = "org.apache.cxf.interceptor.LoggingOutInterceptor")
public interface IPropInfoWebService {

	/**
	 * 功能:移动数据
	 * 
	 * @param servletRequest
	 * @param commId
	 * 
	 * @return
	 * @throws Exception
	 * 
	 * */
	@GET
	@Path("/movedata/{commId}")
	@Produces({ "application/json" })
	public Response moveDataByCommId(
			@Context HttpServletRequest servletRequest,
			@PathParam("commId") String commId) throws Exception,
			AppBizException;

	/**
	 * 功能:根据小区ID获取小区下的所有信息
	 * 
	 * @param servletRequest
	 * @param commId
	 * 
	 * @return
	 * @throws Exception
	 * 
	 * */
	@GET
	@Path("/getAllInfo/{commID}")
	@Produces({ "application/json" })
	public Response getAllInfo(@Context HttpServletRequest servletRequest,
			@PathParam("commID") String commID) throws Exception,
			AppBizException;

	/***
	 * 删除授权关系
	 * 
	 * @param servletRequest
	 * @param linkAptHouseholderID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@DELETE
	@Path("/owners/{linkAptHouseholderID}")
	@Produces({ "application/json" })
	public Response deleteOwners(@Context HttpServletRequest servletRequest,
			@PathParam("linkAptHouseholderID") String linkAptHouseholderID)
			throws Exception, AppBizException;

	/***
	 * 添加业主
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@POST
	@Path("/owners/add")
	@Produces({ "application/json" })
	public Response addOwners(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	/****
	 * 修改业主
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@PUT
	@Path("/owners/edit")
	@Produces({ "application/json" })
	public Response editOwners(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	/***
	 * 更换车位使用人
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@PUT
	@Path("/owners/changeOwner")
	@Produces({ "application/json" })
	public Response changeOwner(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	/***
	 * 添加产群
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@POST
	@Path("/property/add")
	@Produces({ "application/json" })
	public Response addProperty(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	/***
	 * 修改产权
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */

	@PUT
	@Path("/property/edit")
	@Produces({ "application/json" })
	public Response editProperty(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	/***
	 * 导入产权
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@POST
	@Path("/property/import")
	@Produces({ "application/json" })
	public Response importProperty(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	
	
	/****
	 * 获取楼栋
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@GET
	@Path("/{commID}/buildings")
	@Produces({ "application/json" })
	public Response getBuildings(@Context HttpServletRequest servletRequest,
			@PathParam("commID") String commID) throws Exception,AppBizException;
	
	
	/****
	 * 获取单元
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@GET
	@Path("building/{buildingID}/units")
	@Produces({ "application/json" })
	public Response getUnits(@Context HttpServletRequest servletRequest,
			@PathParam("buildingID") String buildingID) throws Exception,AppBizException;
	
	
	
	/****
	 * 获取单元
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@POST
	@Path("apartment")
	@Produces({ "application/json" })
	public Response getApartments(@Context HttpServletRequest servletRequest,
			@WebParam() Map<String,Object> params) throws Exception,AppBizException;
	
	/****
	 * 获取单元
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@POST
	@Path("owners")
	@Produces({ "application/json" })
	public Response getOwners(@Context HttpServletRequest servletRequest,
			@WebParam() Map<String,Object> params) throws Exception,AppBizException;
	
	/****
	 * 单元获取房屋信息
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@GET
	@Path("unit/{unitID}/apartments")
	@Produces({ "application/json" })
	public Response getApartmentsByUnitID(@Context HttpServletRequest servletRequest,
			@PathParam("unitID") String unitID) throws Exception,AppBizException;
	/****
	 * 获取房屋信息
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@GET
	@Path("building/{buildingID}/apartments")
	@Produces({ "application/json" })
	public Response getApartmentsByBuiLding(@Context HttpServletRequest servletRequest,
			@PathParam("buildingID") String buildingID) throws Exception,AppBizException;
	
	/****
	 * 获取业主
	 * 
	 * @param servletRequest
	 * @param apartmentID
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@GET
	@Path("/{apartmentID}/owners")
	@Produces({ "application/json" })
	public Response getOwners(@Context HttpServletRequest servletRequest,
			@PathParam("apartmentID") String apartmentID) throws Exception,
			AppBizException;

	@PUT
	@Path("/comm/add")
	@Produces({ "application/json" })
	public Response addComm(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	/****
	 * 修改小区
	 * 
	 * @param servletRequest
	 * @param paMap
	 * @return
	 * @throws Exception
	 * @throws AppBizException
	 */
	@PUT
	@Path("/comm/edit")
	@Produces({ "application/json" })
	public Response editComm(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@POST
	@Path("/building/add")
	@Produces({ "application/json" })
	public Response addBuilding(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@PUT
	@Path("/building/edit")
	@Produces({ "application/json" })
	public Response editBuilding(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@DELETE
	@Path("/building/{buildingID}")
	@Produces({ "application/json" })
	public Response deletBuilding(@Context HttpServletRequest servletRequest,
			@PathParam("buildingID") String buildingID) throws Exception,
			AppBizException;

	@POST
	@Path("/unit/add")
	@Produces({ "application/json" })
	public Response addUnit(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@PUT
	@Path("/unit/edit")
	@Produces({ "application/json" })
	public Response editUnit(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@DELETE
	@Path("/unit/{unitID}")
	@Produces({ "application/json" })
	public Response deletUnit(@Context HttpServletRequest servletRequest,
			@PathParam("unitID") String unitID) throws Exception,
			AppBizException;

	@POST
	@Path("/apartment/add")
	@Produces({ "application/json" })
	public Response addApartment(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@PUT
	@Path("/apartment/edit")
	@Produces({ "application/json" })
	public Response editApartment(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> paMap) throws Exception,
			AppBizException;

	@DELETE
	@Path("/apartment/{apartmentID}")
	@Produces({ "application/json" })
	public Response deletApartment(@Context HttpServletRequest servletRequest,
			@PathParam("apartmentID") String apartmentID) throws Exception,
			AppBizException;

	/***
	 * 批量更新单元楼栋
	 * 
	 * @param servletRequest
	 * @param map
	 * @return
	 * @throws Exception
	 */
	@PUT
	@Path("bauthEditBuildingUnit")
	@Produces({ "application/json" })
	public Response bauthEditBuildingUnit(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> map) throws Exception;

	/***
	 * 批量更新房屋单元房号
	 * 
	 * @param servletRequest
	 * @param map
	 * @return
	 * @throws Exception
	 */
	@PUT
	@Path("bauthEditUnitApart")
	@Produces({ "application/json" })
	public Response bauthEditUnitApart(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> map) throws Exception;

	/***
	 * 批量删除楼栋
	 * 
	 * @param servletRequest
	 * @param map
	 * @return
	 * @throws Exception
	 */
	@POST
	@Path("bauthDeleteBuilding")
	@Produces({ "application/json" })
	public Response bauthDeleteBuilding(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> map) throws Exception;

	/***
	 * 批量删除单元
	 * 
	 * @param servletRequest
	 * @param map
	 * @return
	 * @throws Exception
	 */
	@POST
	@Path("bauthDeleteUnit")
	@Produces({ "application/json" })
	public Response bauthDeleteUnit(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> map) throws Exception;

	/***
	 * 批量删除房屋
	 * 
	 * @param servletRequest
	 * @param map
	 * @return
	 * @throws Exception
	 */
	@POST
	@Path("bauthDeleteApartment")
	@Produces({ "application/json" })
	public Response bauthDeleteApartment(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> map) throws Exception;

}
